<table class="layui-table">
    <thead>
    <tr>
        <td>专题编号</td>
        <td>专题标题</td>
        <td>发布人</td>
        <td>更新时间</td>
        <td>专题状态</td>
        <td>管理操作</td>
    </tr>
    </thead>
    {present name='topics'}
    {volist name='topics' id='topic'}
    <tr>
        <td>{$topic.id}</td>
        <td>{$topic.name}</td>
        <td>{$topic.member.username}</td>
        <td>{$topic.update_time}</td>
        <td class="layui-form">
            <input type="checkbox" lay-skin="switch" lay-filter="status" lay-text="ON|OFF" data-id="{$topic.id}"  value="1" {eq name="topic.status" value="1"} checked{/eq}>
        </td>
        <td class="textalign">
            <a href="javascript:topic.edit('{$topic.id}');" class="layui-btn layui-btn-small btn-success">
                编辑
            </a>
            <a href="javascript:topic.delete('{$topic.id}');"  class="layui-btn layui-btn-small btn-danger">
                删除
            </a>
        </td>
    </tr>
    {/volist}
    {/present}
</table>
<div class="fr mt20">
    总记录数：{$topics->total()} {$topics->render()}
</div>
